<?php

namespace app\index\controller;

use app\common\controller\Frontend;
use think\Db;

class Index extends Frontend
{

    protected $noNeedLogin = '*';
    protected $noNeedRight = '*';
    protected $layout = '';

    protected $start = '';


    public function index()
    {
        $this->redirect('../cms/');
        return $this->view->fetch();
    }

    public function sort()
    {
        $field = input('get.field');
        $order = input('get.order');
        $list = Db::name('cms_archives')->order("$field $order")->select();
        return json($list);
    }

}